<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html><head>
<meta charset="utf-8">
<link href="/Public/css/Home/login.css" rel="stylesheet" type="text/css">
<link href="/Public/css/Home/base.css" rel="stylesheet" type="text/css">
<link href="/Public/css/Home/header.css" rel="stylesheet" type="text/css">
<link href="/Public/css/Home/footer.css" rel="stylesheet" type="text/css">
<script src="/Public/js/Home/jquery-1.7.1.min.js" type="text/javascript"></script>
<title>新起点(辽宁)财税咨询服务有限公司</title>
</head>


<body>
<!--头部开始-->
<div class="page_header">
<div class="header_top bgblue">
    <div class="header_topT contact">
        <div class="header_topL">您好：欢迎进入新起点(辽宁)财税咨询服务官网</div>	
		<?php if(session('LOGIN_USERID') != ''): ?><div class="header_topR">
            <span>你好，<?php echo session('LOGIN_USERNAME');?></span><span>|</span>
            <a href="<?php echo U('user/index');?>">个人中心</a><span>|</span>
            <a href="javascript:void(0);">消息（1）</a><span>|</span>
            <a href="javascript:void(0);">在线客服</a><span>|</span>
            <a href="<?php echo U('index/logout');?>">退出</a>
        </div><?php endif; ?>
    </div>
    <div class="clean"></div>
</div>
<!--头部结束-->

<!--logo开始-->
<div class="header contact">
    <div class="header_logo">
    	<div class="header_logoimg" style="cursor:pointer" onclick="window.location.href='/'" ><img src="/Public/image/Home/logo.jpg"></div>
        <div class="header_text">
		<?php if(CONTROLLER_NAME.'/'.ACTION_NAME == 'Index/login'): ?>欢迎登录<?php endif; ?>
		<?php if(CONTROLLER_NAME.'/'.ACTION_NAME == 'Index/register'): ?>用户注册<?php endif; ?>
		<?php if(CONTROLLER_NAME.'/'.ACTION_NAME == 'Index/forget_pwd'): ?>找回密码<?php endif; ?>
		<?php if(CONTROLLER_NAME.'/'.ACTION_NAME == 'Index/reset_pwd'): ?>找回密码<?php endif; ?>
		</div>
    	<div class="header_logotel"><img src="/Public/image/Home/header_tel.jpg"></div>
        <div class="clean"></div>
    </div>
</div>
<!--logo结束-->
</div>
<!----------------------------------------------------------------导航线结束---------------------------------------------------------------->

<div class="login_bg">
<div class="login_contact">
    <div class="login_transparent">
    <div class="register">
    	<div class="title">用户注册</div>
    	<div class="box">
		<form action="/Home/Index/doregister" method="post" id="form">
        	<div class="form">
            	<div class="form_name">手机号</div>
                <div class="form_M"><input type="text" class="input-control" name="username" id="uname" placeholder="请输入手机号" /></div>
                <div class="clean"></div>
            </div>
         	<div class="form">
            	<div class="form_name">密码</div>
                <div class="form_M"><input type="password" class="input-control" name="password" id="pwd" placeholder="请输入密码" /></div>
                <div class="clean"></div>
            </div> 
         	<div class="form">
            	<div class="form_name">验证码</div>
                <div class="form_L"><input type="text" class="input-control" name="yzcode" id="yzcode" placeholder="请输入验证码" /></div>
                <div class="form_D" onclick="get_code(this);"><!-- <input type="button" onclick="get_code(this);" value="免费获取验证码" /> -->免费获取验证码</div>
                <div class="clean"></div>
            </div>             
            
            <div class="automatic"><input class="choose" id="agreement" type="checkbox" checked></div>   
            <div class="automatic_text"><label for="agreement">我已阅读并同意新起点</label><a href="<?php echo U('index/terms_of_service');?>" class="forget" target="_blank">《隐私条款》</a></div> 
            <div class="clean"></div> 
            
            <div class="btn btncommonhover" onclick="sub_zhuce();">立即注册</div>
            <div class="text">已有账号，<a href="/Home/Index/login">立即登录</a></div>
		</form>
        </div>
    </div>
    </div>
</div>
</div>

<!----------------------------------------------------------------内容结束---------------------------------------------------------------->

<script>
		var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
	function sub_zhuce(){
		var uname=$("#uname").val();
		var pwd=$("#pwd").val();
		var yzcode=$("#yzcode").val();
		if(!$("#agreement").attr("checked")){
			$("#agreement").attr("checked",true)
			return false;
		}
		if(!myreg.test(uname)) 
		{ 
			alert('请输入有效的手机号码！'); 
			document.getElementById("uname").focus();
			return false; 
		}
		if(uname && pwd && yzcode){
			$("#form").submit();
		}
	}

	var countdown=60;
	function get_code(vals){
		var uname=$("#uname").val();
		var pwd=$("#pwd").val();
       if(!myreg.test(uname)) 
       { 
           alert('请输入有效的手机号码！'); 
           document.getElementById("uname").focus();
           return false; 
       }
	   if(!pwd.replace(/\s+/g, "")) 
       { 
           alert('密码不能为空'); 
           document.getElementById("pwd").focus();
           return false; 
       }
	   if(pwd.length<6){
			alert('密码长度必须6位以上！'); 
           document.getElementById("pwd").focus();
           return false;
	   }
	   $.post('<?php echo U("index/get_username");?>',{uname:uname},function(data){
			if(data.code==0){
				alert('用户已经存在，请更换手机号注册！');
				 document.getElementById("uname").focus();
				return false;
			}else{
			   $.post('<?php echo U("index/get_code");?>',{uname:uname},function(data){
					if(data.code==0){
						alert(' error ');return false;
					}
			   },'json');
				set_time(vals);
			
			}
	   },'json');
	}

	function set_time(vals) { 
		if (countdown == 0) { 
			//vals.removeAttribute("disabled"); 
			//vals.value="免费获取验证码"; 
			vals.setAttribute("onclick","get_code(this)"); 
			$(vals).html("免费获取验证码"); 
			countdown = 60; 
		} else { 
			//vals.setAttribute("disabled", true); 
			//vals.value="重新发送(" + countdown + ")"; 
			vals.removeAttribute("onclick"); 
			$(vals).html("重新发送(" + countdown + ")"); 
			countdown--; 
			setTimeout(function() { 
			set_time(vals) 
			},1000) 
		}
	}
</script>

<!--尾部开始-->
<div class="footer">
	<div class="footreC contact">
    
 	 	<div class="footreC_left">
        	<div class="footreC_leftT">
            	<a href="/Partner/index">寻找合伙人</a>
                |
                <a href="/Apply/index">创业投资</a>
                |
                <a href="/Project/index">创业项目</a>
                |
                <a href="/Service/index">一站式服务</a>
                |
                <a href="/Activity/index">活动专区</a>
                |
                <a href="/service/about">关于我们</a>
            </div>
            <div class="footreC_leftX"></div><div class="footreC_leftS"></div>
            
            <div class="footerC_leftB">
            <p>版权归&nbsp;&nbsp;&nbsp;新起点（辽宁）财税咨询服务有限公司所有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ICP备案编号：正在进行备案</p>
            <p>地址：沈阳市沈河区银河国际A座17楼&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               咨询电话：400-805-2838 / 87267777 / 13386896688&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               Email:1966914080@qq.com</p>
            </div>
        </div>
        
        <div class="footreC_right">扫一扫，加关注<img src="/Public/image/Home/erweima.jpg" width="101" height="101"></div>
    </div>
</div>
<!--尾部结束-->

<!--浮动开始-->
<div id="fudong">
	<div class="fudong"><a class="one" href="#"></a><a class="two" href="#"></a></div>
</div>
<!--浮动结束-->

</body>
</html>